<!DOCTYPE html>
<html lang="en">
<head>
    <#import "../common/common.macro.ftl" as netCommon>
	<@netCommon.commonStyle />
</head>
<body>
<div class="wrapper">

            <div class="box-body">
                <form id="updateUserForm">
                    <!-- text input -->
                    <input type="hidden" readonly class="form-control" name="id" value="${user.id!''}">
                    <div class="form-group">
                        <label>登录名</label>
                        <input type="text" readonly class="form-control" name="username" value="${user.username!''}">
                    </div>
                    <div class="form-group">
                        <label>姓名</label>
                        <input type="text" class="form-control" name="name" value="${user.name!''}">
                    </div>
                    <div class="form-group">
                        <label>手机</label>
                        <input type="text" class="form-control" name="phone" value="${user.phone!''}">
                    </div>
                    <div class="form-group">
                        <label>邮箱</label>
                        <input type="text" class="form-control" name="mail" value="${user.mail!''}">
                    </div>
                    <div class="form-group">
                        <label>部门</label>
                        <select id="depId" name="depId" class="form-control select2" data-placeholder="Select a State" style="width: 100%;" onchange="changeDepName()">
                            <option <#if user.depId?exists || user.depId == -1 >selected</#if> value="-1"></option>
                            <#list deps as item>
                                <option <#if user.depId?exists && user.depId == item.id >selected</#if> value="${item.id}">${item.depName}</option>
                            </#list>
                        </select>
                        <input id="depName" type="hidden" class="form-control" name="depName" value="${user.depName!''}">
                    </div>
                    <div class="form-group">
                        <label>备注</label>
                        <input type="text" class="form-control" name="remark" value="${user.remark!''}">
                    </div>
                    <button id="updateUserBtn" type="button" class="btn btn-block btn-primary">提交</button>

                </form>
            </div>
            <!-- /.box-body -->
        <!-- /.box -->
</div>

<@netCommon.commonScript />
<script src="${request.contextPath}/static/js/user.js" ></script>
</body>
</html>